home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
c't freeware shareware 2001 January
/
CT_SW0101.ISO
/
pc
/
software
/
kommunik
/
multimed
/
snakcarb.sit
/
Snak 4.6.3 Carbon
/
Scripts
/
RepeatingMessage
< prev
next >
Wrap
Text File
|
2000-05-02
|
1KB
|
43 lines
# Lines with '#' are comments that are not executed
# This file contains an example of how to add additional functionality to Snak.
# This example shows how to periodically send a message to a the channel.
# To automatically load this into a connection, add "/load repeatingmessage" to the startup actions
# The repeating message can be turned on and off
# This flag turns the message on and off
assign do_repeatingmessage_flag Y
# This is the alias that is run every 5 seconds as long as the flag is on.
# It outputs a message "hello" and then starts a timer that 5 seconds later will
# run the alias again.
# The "echo hello" only displays the text locally. This lets you experiment
# without annoying other people in the channel.
# When you are ready, replace the "echo" with "say" to really send the text to the channel.
alias repeatingmessage {
if ([$do_repeatingmessage_flag] == [Y]) {
echo hello
timer 5 repeatingmessage
}
}
# These aliases start and stop the repeating message by setting the flag to Y or N
# The ^ in front of the assign makes it "silent"
alias StartRepeatingMessage {
^assign do_repeatingmessage_flag Y
repeatingmessage
}
alias StopRepeatingMessage {
^assign do_repeatingmessage_flag N
}